package com.dragon.speech.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 语音识别API
 * Created by jingcai.li on 2017/6/29.
 */
@Service("speechService")
public class SpeechServiceImpl implements SpeechService{
    @Resource
    private GoogleSpeech googleSpeech;
    @Override
    public List<String> speechToText(byte[] data,String text)throws Exception{
       return googleSpeech.streamingRecognize(data,text);
    }

    @Override
    public String textToSpeech(String text) {
        return null;
    }
}
